<html lang="zh-CN">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  </head>
  <body>
    <script src="./../../dist/digit.min.js"></script>
    <script>
      (function(){
        const transform = Pictool.digit.transform;
        const rgb = {r: 12, g: 15, b: 10};
        const hsl = transform.RGB2HSL(rgb)

        console.log(`transform.RGB2HSL(${JSON.stringify(rgb)}) = `);
        console.log(hsl);	// {h:96, s:20, l:5}
      })();
      (function(){
        const transform = Pictool.digit.transform;
        const hsl = {h:96, s:20, l:5};
        const rgb = transform.HSL2RGB(hsl)

        console.log(`transform.HSL2RGB(${JSON.stringify(hsl)}) = `);
        console.log(rgb);	// {r: 12, g: 15, b: 10}
      })();


      (function(){
        const transform = Pictool.digit.transform;
        const rgb = {r: 255, g: 255, b: 255};
        const hsl = transform.RGB2HSL(rgb)

        console.log(`transform.RGB2HSL(${JSON.stringify(rgb)}) = `);
        console.log(hsl);	// {h: 0, s: 0, l: 100}
      })();

      (function(){
        const transform = Pictool.digit.transform;
        const hsl = {h: 0, s: 0, l: 100};
        const rgb = transform.HSL2RGB(hsl)

        console.log(`transform.HSL2RGB(${JSON.stringify(hsl)}) = `);
        console.log(rgb);	// {r: 255, g: 255, b: 255}
      })();
    </script>
  </body>
</html>